from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.gca(projection='3d')

# Plot a sin curve using the x and y axes.
uui = np.loadtxt('uui.txt')
sr = uui.shape[0]
ax.scatter(uui[1:sr:2,0], uui[1:sr:2,1], uui[1:sr:2,2] )

# Make legend, set axes limits and labels


ax.set_xlim(-2.4, 2.4)
ax.set_ylim(-2.4, 2.4)
# ax.set_zlim(0, 1)
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')

# Customize the view angle so it's easier to see that the scatter points lie
# on the plane y=0
ax.view_init(elev=20., azim=-35)

plt.show()